import request from '@/utils/request'

// 查询超市列表
export function listSupermarket(query) {
  return request({
    url: '/shop/supermarket/list',
    method: 'get',
    params: query
  })
}

// 查询超市详细
export function getSupermarket(id) {
  return request({
    url: '/shop/supermarket/' + id,
    method: 'get'
  })
}
// 查询超市名称
export function getSupermarketName(userId) {
  return request({
    url: '/shop/supermarket/supermarketName/' + userId,
    method: 'get'
  })
}
// 新增超市
export function addSupermarket(data) {
  return request({
    url: '/shop/supermarket',
    method: 'post',
    data: data
  })
}

// 修改超市
export function updateSupermarket(data) {
  return request({
    url: '/shop/supermarket',
    method: 'put',
    data: data
  })
}

// 删除超市
export function delSupermarket(id) {
  return request({
    url: '/shop/supermarket/' + id,
    method: 'delete'
  })
}
